package com.hzjq.encrypt.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hzjq.encrypt.R
import com.hzjq.encrypt.bean.Zbqy

class ZbqyAdapter : BaseQuickAdapter<Zbqy,BaseViewHolder> {

    constructor(data: MutableList<Zbqy>?) : super(R.layout.item_jbqy_layout, data)

    override fun convert(holder: BaseViewHolder, item: Zbqy) {
        holder.setText(R.id.jbqyItemJdText,"经度:"+item.zbqyjd)
        holder.setText(R.id.jbqyItemWdText,"纬度:"+item.zbqywd)
        holder.setText(R.id.jbqyItemBjText,"半径:"+item.zbqybj)
        holder.setText(R.id.jbqyItemQssjText,"起始时间:"+item.zbqssj)
        holder.setText(R.id.jbqyItemJzsjText,"截止时间:"+item.zbjzsj)
        holder.getView<TextView>(R.id.lgItemDeleteText)
            .setOnClickListener {
                getOnItemChildClickListener()?.onItemChildClick(this,it,holder.adapterPosition)
            }
        holder.getView<TextView>(R.id.lgItemEditorText)
            .setOnClickListener {
                getOnItemChildClickListener()?.onItemChildClick(this,it,holder.adapterPosition)
            }
        item.position = holder.adapterPosition
    }
}